package com.yj.service;

import com.yj.entity.Houses;
import com.yj.entity.Region;
import com.yj.vo.JsonResult;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.service.IService;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author yj
 * @since 2020-08-24
 */
public interface IHousesService extends IService<Houses> {
	
	//页码
	public JsonResult pages();
	
	//每页数据
	public JsonResult page(int pageNum);
	
	//搜索
	public JsonResult find(String info);
	
	//分类查询
	public JsonResult findByType(JSONObject json);
	
	//查询出房子大小集合
	public JsonResult findHousesSize();
	
	//查询出价格集合
	public JsonResult findPrices();
	

	//推荐热门房子的集合
	
	public JsonResult fondHouse();
	

	//房源信息的展示
	
	public JsonResult showhousedetail(int hid);
	
	//房源信息的修改
	
	public JsonResult updhouse(Houses house,Region region);
	
	//房源信息的刪除
	
	public JsonResult delhouse(int id); 
	
	//房源照片上传
	
	public JsonResult upHouseImg(int hid,HttpServletRequest request);

	//房源信息发布
	
	public JsonResult inserthouse(Houses house,Region region,HttpSession session); 
	
	//根据用户的id查找自己发布过的房源信息
	
	public JsonResult findbyUid(HttpSession session);
	
	//根据用户的id查找自己租过房子的信息
	
	public JsonResult findzufang(HttpSession session);
	
	//根据did找相同地区的房源
	public JsonResult findByDid(int did);
}
